FROM ubuntu:22.04
MAINTAINER luoluoluo
#设置中文环境
ENV LANG C.UTF-8
#复制源
COPY ./sources.list /etc/apt/sources.list

# build参数
ARG user=luoluoluo
ARG passwd=123456

# 安装依赖项
RUN apt update
RUN apt install -y vim tmux wget
RUN apt install -y net-tools iputils-ping
RUN apt-get install -y openssh-server
RUN apt-get install -y sudo
#添加用户
RUN adduser ${user} && usermod -aG sudo ${user} && echo "${user}:${passwd}" | chpasswd
USER ${user}

#创建工作环境
ENV MYPATH /home/${user}
WORKDIR $MYPATH

#复制文件到镜像中
COPY ./.tmux.conf /home/${user}
COPY ./.vimrc /home/${user}

#指定命令行解释器
CMD /bin/bash

#安装miniconda
RUN mkdir -p ~/miniconda3
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
RUN bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
RUN rm -rf ~/miniconda3/miniconda.sh
RUN ~/miniconda3/bin/conda init bash
RUN ~/miniconda3/bin/conda config --set auto_activate_base false

